<?php 

/**
*  
*/
class CMain extends My_Controller {
	
	public function __construct() {
		# code...
		parent::__construct();
		$this->load->helper("url");
		
	}
public function index() {
		$data['url_path']=$this->config->item('url_path');
		$data['temp_path']=$this->config->item('temp_path');
        $data['upload_path']=$this->config->item('upload_path');

        $data['data_listAlbumHot']=$this->Malbum->getAlbumHot(9);
		$data['data_listSong_hot']=$this->Mmusic->getTopSong(10);
		$data['data_bxh_video']=$this->Mvideo->getTopVideo(10);

		$data['data_listSong_hot']=parent::getBase64Code($data['data_listSong_hot'],'idSong');
        $data['data_listSong_hot']=parent::getBase64Code($data['data_listSong_hot'],'idArtist');
        $data['data_listSong_hot']=parent::convertStringUrl($data['data_listSong_hot'],'strFileName','title');
        $data['data_listSong_hot']=parent::convertStringUrl($data['data_listSong_hot'],'strArtist','titleArtist');

		$data['data_listAlbumHot']=parent::getBase64Code($data['data_listAlbumHot'],'idAlbum');
		$data['data_listAlbumHot']=parent::getBase64Code($data['data_listAlbumHot'],'idArtist');
		$data['data_listAlbumHot']=parent::convertStringUrl($data['data_listAlbumHot'],'strNameAlbum','titleAlbum');
		$data['data_listAlbumHot']=parent::convertStringUrl($data['data_listAlbumHot'],'strArtist','titleArtist');

        $data['data_bxh_video']=parent::getBase64Code($data['data_bxh_video'],'idVideo');
        $data['data_bxh_video']=parent::getBase64Code($data['data_bxh_video'],'idArtist');
        $data['data_bxh_video']=parent::convertStringUrl($data['data_bxh_video'],'strFileName','titleVideo');
        $data['data_bxh_video']=parent::convertStringUrl($data['data_bxh_video'],'strArtist','titleArtist');
        $data['data_bxh_video']=parent::convertStringUrl($data['data_bxh_video'],'strExtraArtist','titleExtraArtist');		

		$this->template->add_title('Nghe nhạc chất lượng cao - nghenhac.vn');

		$this->template->add_css('views/user/public/css/content-left-topic.css');
		$this->template->add_css('views/user/public/css/content-left-zone.css');
        $this->template->add_css('views/user/public/css/content-navright.css');

		$this->template->parse_view('content_left','user/module/content-navleft-topic',$data);
		$this->template->parse_view('content_left','user/module/content-navleft-zone',$data);
		$this->template->parse_view('content_center','user/module/content-albumhot',$data);
		$this->template->parse_view('content_right','user/module/content-navright-rank',$data); 

		$this->template->render();
	}

}
 
?>